home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
clipper
/
nftroff.zip
/
3.tr
< prev
next >
Wrap
Text File
|
1991-11-21
|
32KB
|
1,833 lines
.de }n
.bp
.sp .5i
..
.wh -.8i }n
.sp .5i
.po -.4i
.ll 7.5i
.ps 9
.vs 9
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_CHDIR() Change the current directory
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_CHDIR()
Change the current directory
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_CHDIR( <cDirName> ) -> nResult
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<cDirName>\fR is the name of the desired directory\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
.ta 0.24i
0 if successful
.br
.ta
.ta 0.24i
3 if path not found
.br
.ta
99 if invalid parameters passed
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
Use this function if you prefer to change the active directory
instead of relying on the SET PATH command\.
.sp
The source code is written to adhere to Turbo Assembler\'s IDEAL mode\.
To use another assembler, you will need to rearrange the PROC and
SEGMENT directives, and also the ENDP and ENDS directives (a very
minor task)\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
FT_CHDIR( "C:\\CLIPPER" )
.br
FT_CHDIR( "\\" )
.br
FT_CHDIR( "\.\.\\SOURCE" )
.sp
.in 0.08i
\fBSource:\fR CHDIR\.ASM
.sp
\fBAuthor:\fR Ted Means
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_DEFAULT() Retrieve and optionally change the current default drive
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_DEFAULT()
Retrieve and optionally change the current default drive
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_DEFAULT( [ <cDrive> ] ) -> cDrive
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<cDrive>\fR is optional, and if specified is the new default drive\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
The current default drive\. If a change of default drive is requested,
the return value is the drive AFTER the change is made\. This allows
you to make sure you specified a valid drive (i\.e\. if you attempt to
change the default drive, and the function returns a different drive
letter than the one you specified, then the drive does not exist)\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
Useful any time you need to know or change the default drive\.
.sp
The source code is written to adhere to Turbo Assembler\'s IDEAL mode\.
To use another assembler, you will need to rearrange the PROC and
SEGMENT directives, and also the ENDP and ENDS directives (a very
minor task)\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.ta 1.92i
cDrive := FT_DEFAULT() && Get the current drive
.br
.ta
.ta 1.92i
FT_DEFAULT("C") && Switch to drive C
.br
.ta
.sp
IF FT_DEFAULT("E") != "E"
.in 0.64i
Qout( "Drive E does not exist!" )
.in 0.4i
ENDIF
.sp
.in 0.08i
\fBSource:\fR DEFAULT\.ASM
.sp
\fBAuthor:\fR Ted Means
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_DOSVER Return the current DOS major and minor version as a string
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_DOSVER
Return the current DOS major and minor version as a string
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_DOSVER() -> <cVersion>
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
A character string with the major version number first, a
period ("\."), then the minor version number (e\.g\., "3\.30")
.sp
.in 0.08i
\fBDescription
.sp
.sp
.in 0.4i
FT_DOSVER() invokes DOS interrupt 21h, service 30 in order to
return the current DOS version\. It does this by setting up
an array corresponding to machine registers and then calling
the toolkit function FT_INT86()\.
.sp
It returns a character string corresponding to the DOS
version, as follows: The major version, a period ("\."), then
the minor version\.
.sp
.sp
.sp
.in 0.08i
\fBExamples
.sp
.sp
.in 0.48i
.br
FUNCTION main()
.br
RETURN QOut( "Dos version: " + FT_DOSVER() )
.sp
.sp
.in 0.08i
\fBSource:\fR DOSVER\.PRG
.sp
\fBAuthor:\fR Glenn Scott
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_DSKFREE() Return the amount of available disk space
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_DSKFREE()
Return the amount of available disk space
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_DSKFREE( [ <cDrive> ] ) -> nSpaceAvail
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<cDrive>\fR is the fixed disk to query\. If no parameter is passed
the operation will be performed on the default drive\. Do not
include the ":"\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
Integer representing the available disk space in bytes\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
Function to return the available space on the passed
drive letter or the default drive if no drive is passed\.
.sp
Uses FT_INT86() through the internal function _ftDiskInfo()\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.ta 1.28i
? FT_DSKFREE() // Returns free space on default drive\.
.br
.ta
.sp
.in 0.08i
\fBSource:\fR DISKFUNC\.PRG
.sp
\fBAuthor:\fR Robert A\. DiFalco
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_DSKSIZE() Return the maximum capacity of a fixed disk
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_DSKSIZE()
Return the maximum capacity of a fixed disk
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_DSKSIZE( [ <cDrive> ] ) -> nMaxCapacity
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<cDrive>\fR is the fixed disk to query\. If no drive is sent, the
operation will be performed on the default drive\. Send without
the ":"\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
An integer representing the maximum disk capacity in bytes\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
Function utilizing FT_INT86() to return Maximum Disk Size\.
Uses FT_INT86() through the internal function _ftDiskInfo()\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.ta 1.6i
.br
? FT_DSKSIZE() // Maximum capacity for default drive
.br
.ta
.br
? FT_DSKSIZE( "D" ) // Maximum capacity for Drive D:
.sp
.in 0.08i
\fBSource:\fR DISKFUNC\.PRG
.sp
\fBAuthor:\fR Robert A\. DiFalco
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FLOPTST() Test diskette drive status
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FLOPTST()
Test diskette drive status
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.48i
\fBFT_FLOPTST( <nDrive> ) -> nStatus
.sp
.in 0.08i
\fBArguments
.sp
.in 0.48i
\fB<nDrive>\fR is the diskette drive number, 0 = A:, 1 = B:
.sp
.in 0.08i
\fBReturns
.sp
.in 0.48i
.br
-1 - Wrong Parameters
.in 0.56i
.br
0 - Drive Loaded and ready to read or write
.br
1 - Drive Door Open or Diskette inserted upside down
.br
2 - Diskette is unformatted
.br
3 - Write protected
.br
4 - Undetermined
.sp
.in 0.08i
\fBDescription
.sp
.in 0.48i
FT_FLOPTST() is designed as a full replacement for ISDRIVE()\. Where
ISDRIVE() returns just \.T\. or \.F\. depending if the diskette drive is
ready or not, FT_FLOPTST() returns a numeric code designating the
diskette drive\'s status\.
.sp
FT_FLOPTST() is particularly useful in backup and restore programs
that need to test the floppy drive before writing/reading from a
floppy disk\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.48i
.br
iStatus := FT_FLOPTST( 1 )
.sp
.br
DO CASE
.in 0.72i
.br
CASE iStatus == 1
.in 0.96i
.br
Qout( "The door to drive A is open\." )
.in 0.72i
.br
CASE iStatus == 2
.in 0.96i
.br
Qout( "The diskette in drive A is not formatted\." )
.in 0.72i
.br
CASE iStatus == 3
.in 0.96i
.br
Qout( "The diskette in drive A is write-protected\." )
.in 0.72i
.br
CASE iStatus == 4
.in 0.96i
.br
Qout( "Something is wrong with drive A, but I don\'t know what\." )
.in 0.48i
.br
ENDCASE
.sp
.in 0.08i
\fBSource:\fR FLOPTST\.ASM
.sp
\fBAuthor:\fR Joseph LaCour
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_HANDCNT() Count number of available DOS (not network) file handles
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_HANDCNT()
Count number of available DOS (not network) file handles
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.32i
\fBFT_HANDCNT() -> nHandles
.sp
.in 0.08i
\fBArguments
.sp
.in 0.32i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.32i
numeric, long integer
.sp
.in 0.08i
\fBDescription
.sp
.in 0.32i
FT_HANDCNT() finds the internal DOS Device Control Blocks used for
storing file information and counts the number of DCB entries\. The
DCB is set up by reading the FILES= line in CONFIG\.SYS, and there
is one DCB entry for each file handle\.
.sp
NOTE: For Novell networks, the number of network file handles is
.in 0.8i
controlled by SHELL\.CFG